package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SubscriberAccountMapper;
import com.ruoyi.system.domain.SubscriberAccount;
import com.ruoyi.system.service.ISubscriberAccountService;

/**
 * 通讯人员开户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-07
 */
@Service
public class SubscriberAccountServiceImpl implements ISubscriberAccountService 
{
    @Autowired
    private SubscriberAccountMapper subscriberAccountMapper;

    /**
     * 查询通讯人员开户
     * 
     * @param accountId 通讯人员开户主键
     * @return 通讯人员开户
     */
    @Override
    public SubscriberAccount selectSubscriberAccountByAccountId(Long accountId)
    {
        return subscriberAccountMapper.selectSubscriberAccountByAccountId(accountId);
    }

    /**
     * 查询通讯人员开户列表
     * 
     * @param subscriberAccount 通讯人员开户
     * @return 通讯人员开户
     */
    @Override
    public List<SubscriberAccount> selectSubscriberAccountList(SubscriberAccount subscriberAccount)
    {
        return subscriberAccountMapper.selectSubscriberAccountList(subscriberAccount);
    }

    /**
     * 新增通讯人员开户
     * 
     * @param subscriberAccount 通讯人员开户
     * @return 结果
     */
    @Override
    public int insertSubscriberAccount(SubscriberAccount subscriberAccount)
    {
        return subscriberAccountMapper.insertSubscriberAccount(subscriberAccount);
    }

    /**
     * 修改通讯人员开户
     * 
     * @param subscriberAccount 通讯人员开户
     * @return 结果
     */
    @Override
    public int updateSubscriberAccount(SubscriberAccount subscriberAccount)
    {
        return subscriberAccountMapper.updateSubscriberAccount(subscriberAccount);
    }

    /**
     * 批量删除通讯人员开户
     * 
     * @param accountIds 需要删除的通讯人员开户主键
     * @return 结果
     */
    @Override
    public int deleteSubscriberAccountByAccountIds(Long[] accountIds)
    {
        return subscriberAccountMapper.deleteSubscriberAccountByAccountIds(accountIds);
    }

    /**
     * 删除通讯人员开户信息
     * 
     * @param accountId 通讯人员开户主键
     * @return 结果
     */
    @Override
    public int deleteSubscriberAccountByAccountId(Long accountId)
    {
        return subscriberAccountMapper.deleteSubscriberAccountByAccountId(accountId);
    }
}
